<ion-header>
  <ion-toolbar class="orange-bar">
    <ion-buttons slot="start">
      <ion-button color="light" (click)="goBack()">
        <ion-icon name="ios-arrow-back"></ion-icon>
      </ion-button>
    </ion-buttons>
    <ion-title>修改密码</ion-title>
  </ion-toolbar>
</ion-header>

<ion-content>
  <form [formGroup]="formModel">
    <ion-radio-group formControlName="userType" text-center class="type-box">
      <label>个人 <ion-radio [value]="1"></ion-radio></label>
      <label>企业 <ion-radio [value]="2"></ion-radio></label>
    </ion-radio-group>
    <ion-list>
      <ion-item *ngIf="isLogout">
        <ion-input formControlName="mobile" placeholder="请输入手机号码" type="number" maxlength="11"></ion-input>
      </ion-item>
      <ion-item>
        <ion-input formControlName="smsCodeSign" placeholder="短信验证码" type="number" maxlength="6"></ion-input>
        <a *ngIf="resendTime === 0" slot="end" [class.disabled]="!formModel.get('mobile').valid" (click)="getVCode()">
          点击获取
        </a>
        <a *ngIf="resendTime !== 0" fill="clear" slot="end" class="disabled">
          重新获取({{resendTime}})
        </a>
      </ion-item>
    </ion-list>
    <ion-list>
      <ion-item>
        <ion-label position="stacked">设置新登录密码</ion-label>
        <ion-input formControlName="newPassword" placeholder=""
                   [type]="pwdObj.inputType" maxlength="20">
        </ion-input>
        <ion-icon slot="end" [name]="pwdObj.icon" [color]="pwdObj.color" (click)="showPassword()" style="z-index: 1"></ion-icon>
      </ion-item>
    </ion-list>
    <ion-text color="tertiary">
      <p class="tip" padding>
        <ion-icon name="information-circle"></ion-icon>
        密码由6~20位字母或数字组合(区分大小写)
      </p>
    </ion-text>
    <div text-center>
      <a text-center class="link-btn bg-orange" [class.disabled]="!formModel.valid" (click)="doRetrieve()">确认</a>
    </div>
  </form>
</ion-content>
